The present invention relates generally to the field of static language debugging, and more particularly to using a FAT binary to efficiently debug optimized code without the need to rebuild the non-optimized version of the code.
In computing, an optimizing compiler is a compiler that tries to minimize or maximize some attributes of an executable computer program. In general, a computer program may be optimized so that it executes more rapidly, or is capable of operating with less memory storage or other resources, or draws less power. Compiler optimization is generally implemented using a sequence of optimizing transformations, i.e., algorithms, which take a program and transform it to produce a semantically equivalent output program that uses fewer resources.
Debugging is the process of finding and resolving bugs or defects that prevent correct operation of computer software or a system. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge in another. While writing an application, a developer will recompile and test often, and so compilation must be fast. Non-optimized code has a correlation between source code and the object code which enables efficient source level debugging. However, the correlation is not applicable for optimized code. Optimized code is rearranged and modified during the optimization process, which makes it difficult to perform source level debugging. This is one reason most optimizations are deliberately avoided during the test/debugging phase.